const studentDao = require("../../dao/student/studentDao")
module.exports={
    //显示所有学生信息
    async showAllStudentsInfo(){
        return await studentDao.getAllStudents(); 
    },
    //添加学生信息
    async addStudent({name,age,gender,address,score}){
        return await studentDao.insertStudent({name,age,gender,address,score})
    },
    //删除学生信息
    async delStudentInfo(studentid){
        return await studentDao.deleStudentById(studentid)
    },
    //查询学生详细信息
    async showStudentDetailInfo(studentid){
        return await studentDao.getStudentById(studentid)
    },
    //修改学生信息
    async updateStudentInfo({_id,name,age,address,gender,score}){

        return await studentDao.updatStudentById({_id,name,age,address,gender,score})
    }

}

